package offer;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class Test {
    public static void main(String[] args) {
        Singleton1 singleton1 = Singleton1.INSTANCE;

        Singleton2 singleton2 = Singleton2.INSTANCE;

        Singleton3 singleton31 = Singleton3.INSTANCE;
        Singleton3 singleton32 = Singleton3.INSTANCE;
        System.out.println(singleton31.getName() + " " + singleton31.getAge());
        System.out.println(singleton31);
        System.out.println(singleton32);

        Map<String, String> map = new ConcurrentHashMap<>();

        Lock lock = new ReentrantLock(true);
    }
}
